-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf: run installBcc in a subshell #4290
Conversation
Pull Request Test Coverage Report for Build 8885833909Details
💛 - Coveralls |
45a23a8
to
452594e
Compare
452594e
to
ef96350
Compare
What do you think about adding the tests for successful installation to this PR? |
ef96350
to
aec92bb
Compare
@ganeshkumarashok Can do! |
Could you note the approx time saved by parallelization, in the PR description as well? |
Do you mean time saved by running it in the subshell? or marking time for both, in the other PR as well? @ganeshkumarashok |
- bcc-tools | ||
- libbcc-examples | ||
EOF | ||
PARENT_DIR=$(pwd) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be the present directory right? Not parent directory?
- libbcc-examples | ||
EOF | ||
PARENT_DIR=$(pwd) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: add a comment about creating a subshell to install in the background? This is not a common pattern in Agentbaker so it'll be good to note for the future
installBcc | ||
|
||
exit $? | ||
) > /tmp/bcc.log 2>&1 & |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/tmp directory may get deleted on reboots. Can you save it in /var/log/bcc_installation.log
instead? Those logs will remain
73343ab
to
7042679
Compare
7042679
to
5d7a678
Compare
0905b59
to
ce9d856
Compare
echo "$line is missing" | ||
result=1 | ||
fi | ||
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be simplified - just return 1 inside the then
condition if line is missing
result=1 | ||
fi | ||
done | ||
if [ $result -eq 0 ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section can be removed and simplified
9208a33
to
083362a
Compare
083362a
to
fa99b6e
Compare
fa99b6e
to
5513985
Compare
What type of PR is this?
/kind performance
What this PR does / why we need it:
This PR modifies the way bcc tools are installed on ab VHDs. The installBcc function is ran in a subshell so that the main script can continue to execute while bcc packages are downloaded / compiled / installed in the background.
This PR results in about 3 minutes of saved time building the VHDs.
Which issue(s) this PR fixes:
Unsatisfactory VHD Build times.
Requirements: